package org.qengine.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.qengine.entity.QuestionEntity;

import java.io.InputStream;
import java.util.List;

public interface QuestionService extends IService<QuestionEntity> {
    //新增
    int addQuestion(int typeID, int courseID, int knowledgeID, int dLevel, String questionStem, String questionAnswer);
    //解析json导入考题
    int importByJson(List<QuestionEntity> questionEntities);
    //解析doc导入考题
    int importByDoc(InputStream inputStream, Integer courseId);
    //删除
    int deleteQuestionById(int id);
    int deleteQuestionByCourseIdAndKnowledgeId(int courseId, int knowledgeId);
    int deleteQuestionByCourseId(int courseId);
    //修改
    int updateQuestionById(int id, int typeID, int courseID, int knowledgeID, int dLevel, String questionStem, String questionAnswer);
    //查询
    QuestionEntity getQuestionById(int id);
    List<String> findStemAndAnswerById(int id);
    List<QuestionEntity> selectQuestionByCourseId(int courseId);
    List<Integer> DeduplicationQuestion();
    List<Integer> DeduplicationQuestionByCourseId(int CourseId);
    List<QuestionEntity> dynamicSelect(@Param("typeId") Integer typeId, @Param("courseId") Integer courseId, @Param("knowledgeId") Integer knowledgeId, @Param("dLevel") Integer dLevel);
    String testMarks(String list,Long paperId);
}
